﻿// =================================================================== 
// Module说明
//====================================================================
// 创建时间：2018-12-13 12:49:22
// 负责人：lvsc
// ===================================================================
using System;
using System.Data;
using System.Collections.Generic;
using System.Linq.Expressions;
using OF.Utility;
using OF.Component.Model;
using OF.Component.IDAL;
using OF.Component.Factory;
using OF.Component.DTO;

namespace OF.Component.BLL
{

    /// <summary>
    ///二级业务类型 扩展
    /// </summary>
    public partial class BizTypeOperate
    {
        /// <summary>
    	/// 根据断言条件获取单个二级业务类型
    	/// </summary>
        public static BizTypeInfo QuerySingle(Expression<Func<BizTypeInfo, bool>> predicate)
        {
            return dal.QuerySingle(predicate);
        }

        /// <summary>
        /// 根据断言条件获获取二级业务类型列表
        /// </summary>
        public static IList<BizTypeInfo> QueryList(Expression<Func<BizTypeInfo, bool>> predicate)
        {
            return dal.QueryList(predicate);
        }

        /// <summary>
        /// 根据排序查询业务类型
        /// </summary>
        /// <param name="masterBizTypeId"></param>
        /// <param name="sort"></param>
        /// <returns></returns>
        public static List<BizTypeInfo> GetBizTypes(int masterBizTypeId, int sort)
        {
            return dal.GetBizTypes(masterBizTypeId, sort);
        }

        /// <summary>
        /// 分页
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        public static IList<BizTypeDto> SearchList(BasePageConditionFront condition)
        {
            return dal.SearchList(condition);
        }


        /// <summary>
        /// 根据城市获取首页显示的业务
        /// </summary>
        /// <param name="cityId"></param>
        /// <returns></returns>
        public static DataTable GetIndexBizType(int cityId)
        {
            return dal.GetIndexBizType(cityId);
        }
    }
}